package cn.ekuma.epos.analysis.front.saleman.model;

import cn.ekuma.data.ui.swing.AbstractDTOTableModel;
import cn.ekuma.epos.bean.util.sale.TicketLineWarp;
import com.openbravo.bean.sales.TicketLine_V;
import com.openbravo.pos.base.AppLocal;


public class TicketLineVTableModel extends AbstractDTOTableModel<TicketLine_V> {
	
	@Override
	public Object getValueAt(int rowIndex, int columnIndex) {
		TicketLine_V value = getObj(rowIndex);
		TicketLineWarp wapValue=new TicketLineWarp(value);
		switch (columnIndex) {
		case 0:
			return wapValue.printName()+wapValue.getProductAttSetInstDesc();
		case 1:
			return wapValue.printPrice();
		case 2:
			
			return wapValue.printMultiply();
		case 3:
			return wapValue.printTaxRate();
		case 4:
			return wapValue.printSubValue();
			
		case 5:
			return value.getLocation();
		case 6:
			return value.getTicketType();
		case 7:
			return value.getM_iTicketId();
		case 8:
			return value.getM_dDate();
		case 9:
			return value.getSaleMan();
		case 10:
			return value.getCustomerName();
		case 11:
			return value.getPriceRate();
		case 12:
			return value.getUserName();
		}
		return null;
	}


	@Override
	public String[] getColumnNames() {
		return new String[] {
				AppLocal.getIntString("label.item"),
				AppLocal.getIntString("label.price"),
				AppLocal.getIntString("label.units"),
				AppLocal.getIntString("label.tax"),
				AppLocal.getIntString("label.value"),
				
				AppLocal.getIntString("label.location"),
				AppLocal.getIntString("label.ordertype"),
				AppLocal.getIntString("label.orderid"),
				AppLocal.getIntString("label.date"),
				AppLocal.getIntString("Menu.Users"),
				AppLocal.getIntString("label.customer"),
				AppLocal.getIntString("label.priceRate"),
				AppLocal.getIntString("Menu.UserSells")
				
				};
	}
}